﻿#region Using Statements
using System;
using System.Collections.Generic;
using Microsoft.Xna.Framework;
using JigLibX.Collision;
using JigLibX.Physics;
using JigLibX.Geometry;
using JigLibX.Math;
using Microsoft.Xna.Framework.Graphics;
#endregion

namespace sqengine.PhysicObjects
{

    public class MovableObject : BasicObject
    {
        public MovableObject(Game game, string ObjName, Model _model, Matrix orientation, float objscale, Vector3 position, bool movable)
            : base(game, _model, string.Empty)
        {
            Scale = (Vector3.One * objscale);
            body = new Body();

            Name = ObjName;

            collision = new CollisionSkin(body);


            Box b_prim = BuildPhysicsBoxFromModel(_model, orientation, Vector3.One * objscale);
            collision.AddPrimitive(b_prim, new MaterialProperties(0.8f, 0.8f, 0.7f));


            //box_primitive. *=  Matrix.CreateScale(objscale);


            body.CollisionSkin = this.collision;

            body.MoveTo(position, Matrix.Identity);
            body.EnableBody();


        }

        public override void ApplyEffects(BasicEffect effect)
        {

        }

        public override void Update(GameTime gameTime)
        {
            base.Update(gameTime);
        }


    }


}
